﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="志愿者管理.aspx.cs" Inherits="admin_志愿者管理_志愿者管理" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script src="../../plug/datepicker/jquery.datepick.js" type="text/javascript"></script>
<link media="screen" href="../../plug/datepicker/jquery.datepick.css"
    type="text/css" rel="stylesheet"/>
<script type="text/javascript">
    $(function () {
        $("#ctl00_cphMessage_txtFromDate").datepick();
        $("#ctl00_cphMessage_txtToDate").datepick();
    });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphTitle" Runat="Server">
志愿者管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMessage" Runat="Server">
<div class="cphMessage">
    起始日期：<asp:TextBox ID="txtFromDate" runat="server"></asp:TextBox>
    截止日期：<asp:TextBox ID="txtToDate" runat="server"></asp:TextBox>
    姓名：<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
    性别：
    <asp:DropDownList ID="ddlType" runat="server">
        <asp:ListItem Text="全部" Value="-1" Selected="True"></asp:ListItem>
        <asp:ListItem Text="男" Value="男"></asp:ListItem>
        <asp:ListItem Text="女" Value="女"></asp:ListItem>
    </asp:DropDownList>
    <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="button1" OnClick="btnSearch_Click" />
</div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphContent" Runat="Server">
<asp:GridView ID="GridView1" runat="server" CssClass="GridView" 
        AutoGenerateColumns="False" DataKeyNames="Id" 
        OnRowDeleting="GridView1_RowDeleting" onrowupdating="GridView1_RowUpdating">
    <Columns>
        <asp:BoundField DataField="Name" HeaderText="姓名" >
            <HeaderStyle Width="140px" />
        </asp:BoundField>
        <asp:BoundField DataField="Age" HeaderText="年龄" >
            <ItemStyle HorizontalAlign="Center" />
        </asp:BoundField>
        <asp:BoundField DataField="Sex" HeaderText="性别" >
            <ItemStyle HorizontalAlign="Center" />
        </asp:BoundField>
        <asp:BoundField DataField="Email" HeaderText="E-Mail" >
        </asp:BoundField>
        <asp:BoundField DataField="QQ" HeaderText="QQ" >
            <HeaderStyle Width="100px" />
        </asp:BoundField>
        <asp:BoundField DataField="Area" HeaderText="所在地区" >
        </asp:BoundField>
        <asp:BoundField DataField="InsTime" DataFormatString="{0:D}" HeaderText="入职时间" >
            <HeaderStyle Width="100px" />
        </asp:BoundField>
        <asp:TemplateField HeaderText="查看详情">
            <ItemTemplate>
                <a href='志愿者管理_Detail.aspx?id=<%#Eval("Id") %>'>查看</a>
            </ItemTemplate>
            <ItemStyle Width="60px" HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:BoundField HtmlEncode="false" DataField="FreezeStatus" HeaderText="冻结状态" >
            <ItemStyle Width="60px" HorizontalAlign="Center" />
        </asp:BoundField>
        <asp:TemplateField HeaderText="冻结">
            <ItemTemplate>
                <asp:Button ID="btnUpdate" runat="server" CommandName="update" Text='<%# Convert.ToBoolean(Eval("IsFreeze"))?"解冻":"冻结" %>' />
            </ItemTemplate>
            <HeaderStyle Width="60px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="删除">
            <ItemTemplate>
                <asp:Button OnClientClick="javascript:return confirm('确定要删除么？')" ID="btnDel" runat="server" CommandName="delete" Text="删除" />
            </ItemTemplate>
            <HeaderStyle Width="60px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
    </Columns>
</asp:GridView>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cphPaging" Runat="Server">
<div class="cphPaging">
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" OnPageChanged="AspNetPager1_PageChanged" PageSize="15">
    </webdiyer:AspNetPager>
    <div class="pageInfo">
        <asp:Label ID="lblPagingInfo" runat="server" Text="Label"></asp:Label>
    </div>
</div>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="cphButton" Runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="cphFooter" Runat="Server">
</asp:Content>

